import sys


def stderr(message: str):
    if len(message) > 0:
        print(message, file=sys.stderr)

def stdout(message: str):
    if len(message) > 0:
        print(message, file=sys.stdout)

def stdout_stream(message: str):
    print(message, file=sys.stdout, end='', flush=True)

def print_verbose(verbose_info):
    stdout("Verbose:")
    stdout(f"提示词token:{verbose_info.usage.prompt_tokens}")
    stdout(f"回答token:{verbose_info.usage.completion_tokens}")
    stdout(f"总token:{verbose_info.usage.total_tokens}")
